package com.sunelec.service.Imp;

import com.sunelec.mapper.CollectorMapper;
import com.sunelec.mapper.InverterMapper;
import com.sunelec.pojo.Collector;
import com.sunelec.pojo.Inverter;
import com.sunelec.service.DeviceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 郑明利
 * @Description:
 * @Date: Create in 14:14 2018/05/10
 * @Modified By:
 */
@Service
public class DeviceInfoServiceImpl implements DeviceInfoService{

    @Autowired
    private CollectorMapper collectorMapper;

    @Autowired
    private InverterMapper inverterMapper;

    @Override
    public List<Collector> getCollectInfoByPowerId(String powerId) {

        List<Collector> collectorList = collectorMapper.selectCollectInfoByPowerId(powerId);
        return collectorList;
    }

    @Override
    public Inverter getInverterByCollectorSN(String collectorSn) {
        Inverter inverter = inverterMapper.selectInverterByCollectorSN(collectorSn);
        return inverter;
    }
}
